﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>上传控件内容清空</title>
    <script type="text/javascript" language="JavaScript">
        function clearFile(){
            var myfile = document.getElementById('file');
            myfile.outerHTML="<input type=\'file\' id=\'file\'>";
        }
    </script> 
</head>
<body>
<input type="file" id="file" />
<input type="button" id="btn" value="清空" onclick="clearFile()" />
</body>
</html>